package com.zl.service;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Service;

import com.sms.controller.IndustrySMS;

@Service
public class ZlLoginServiceImpl implements ZlLoginService{

	@Override
	public Map<String, Object> checkCode(HttpServletRequest request,HttpSession session) {
		String msg=(String) session.getAttribute("msgCheck");
		Map<String, Object> map=new HashMap<>();
		
		String msgCheck=request.getParameter("checkCode");
		if (msg.trim().equals(msgCheck)) {
			map.put("msg", "1");
			map.put("msgApp", "登陆成功！！");
		}
		return map;
	}

	@Override
	public Map<String, Object> sendCheckCodeZl(String mobile, String msgCheck) {
		Map<String, Object> map=new HashMap<>();
		System.out.println(mobile);
		
		
		IndustrySMS.execute(mobile,msgCheck );
		map.put("appcode", "发送成功！！");
		return map;
	}

}
